<template>
	<navigator :url="'/pages/editCourseNote/editCourseNote?id=' + homeworkId">
	<view class="homeworks">
		
		<view class="left">
			
			<image src="../../static/images/homework.png" mode="aspectFill"></image>
		</view>
		
		<view class="right">
			
			<view class="title">{{title}}</view>
			<view class="courseName">{{courseName}}</view>
		</view>
		<view class="date">
			<text>{{submitDate}}</text>
			<text>{{judgeDate}}</text>
		</view>
	</view>
	</navigator>
</template>

<script setup>
	defineProps({
		title: String,
		courseName: String,
		submitDate: String,
		judgeDate: String,
		homeworkId: Number
	})
	
</script>

<style lang="scss" scoped>
	.homeworks {
		padding: 30rpx;
		height: 160rpx;
		width: 45vh;
		margin: 0 auto;
		border-bottom: 1rpx solid #b0b0b0;
		// border-radius: 10rpx;
		// background-color: ghostwhite;
		// :nth-child(1){
		// 	margin:30rpx 0rpx 0rpx 0rpx;
		// }
		display: flex;
		align-items: center;
		position: relative;
		.left{
			width: 20%;
			height: 100%;
			image{
				width: 70%;
				height: 100rpx;
			}
		}
		.right{
			width: 50%;
			height: 100%;
			// padding-top: 10rpx;
			padding-bottom: 20rpx;
			.title{
				font-weight: 500;
				font-size: 30rpx;
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
			}
			.courseName{
				color: #808080;
				font-size: 25rpx;
				margin-top: 10rpx;
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
			}
		}
		.date{
			white-space: nowrap;
			// padding-top: 50rpx;
			
			color: #808080;
			font-size: 20rpx;
			margin-top: 10rpx;
			display: flex;
			flex-direction: column;
			position: absolute;
			bottom: 0;
			right: 0;
		}
	}
	

</style>